package imganalysis;

/**
 * @author sheila
 * DataUnit represents a Unit of Data->dupla (idObjeto, img dimension vector)
 */
    public class DataUnit{
        private int id;
        private int []  aiDimensionsVector;
        //private int idCluster;
        // poderia adicionar a distancia do centroide como atributo de data unit

        public DataUnit(int [] paiFeatureVector){
            this.aiDimensionsVector = paiFeatureVector;
        }

        public DataUnit(int pid, int [] paiFeatureVector){
            this.id=pid;
            this.aiDimensionsVector = paiFeatureVector;
        }

        public int getId() {
            return id;
        }

        public int[] getAiDimensionsVector() {
            return aiDimensionsVector;
        }

        public int getDimension(int i){
            return this.aiDimensionsVector[i];
        }
        public int getNumDimensions(){
            if(this.aiDimensionsVector!=null)
                return this.aiDimensionsVector.length;
            else
                return 0;
        }

        public int[] cloneAiDimensionsVector(){
            return this.aiDimensionsVector.clone();
        }

    }